<% title t"updateprofile.general.pagetitle" %>
<% queue_js "bootstrap-datepicker" %>
<% queue_css "datepicker" %>
<style type="text/css">
  .well{
      padding:10px
  }
</style>
<% content_for :sidebar do %>
    <legend><h4>Nội quy</h4></legend>
    <p>Deer notwithstanding misunderstood the the coasted especially and reset this about much pithily some sorrowful iguana less so unproductively far more a hatchet following this far against across some that dashing as caterpillar faulty due ready alas pending so imminent irrespective oh llama luxuriant wolf.</p>
    <legend><h4>Thành viên mới đăng ký</h4></legend>
<% end %>
<legend><%= t"updateprofile.general.pagetitle" %></legend>
<form class="form-horizontal register-form" id="register-form" method="post" action="<%= request.fullpath %>">
  <div class="well"><h4>Thông tin tài khoản</h4></div>
  <div class="control-group">
    <label class="control-label" for="inputEmail"><%=t"register.form.email"%></label>
    <div class="controls">
      <div class="input-prepend">
        <span class="add-on"><i class="icon-envelope"></i></span>
        <input  id="inputEmail" value="<%= @student[:email] %>" name="student[email]" type="text" placeholder="<%=t"register.form.email"%>" rel="popover" data-content="Email liên lạc của bạn" data-original-title="Email">
      </div>
    </div>
  </div>
  <div class="control-group">
    <label class="control-label" for="inputLoginname"><%=t"register.form.loginname"%></label>
    <div class="controls">
      <div class="input-prepend">
        <span class="add-on"><i class="icon-user"></i></span>
        <input  id="inputLoginname" value="<%= @student[:login] %>" type="text" name="student[login]" placeholder="<%=t"register.form.loginname"%>" rel="popover" data-content="Tên tài khoản đăng nhập" data-original-title="Tên tài khoản">
      </div>
    </div>
  </div>
  <div class="control-group">
    <label class="control-label" for="inputPassword"><%=t"register.form.oldpassword"%></label>
    <div class="controls">
      <div class="input-prepend">
        <span class="add-on"><i class="icon-eye-open"></i></span>
        <input  id="inputOldPassword" type="password" name="student[password]" placeholder="<%=t"register.form.oldpassword"%>"  rel="popover" data-content="Chọn nhập một mật khẩu" data-original-title="Mật khẩu mới">
      </div>
    </div>
  </div>
  <div class="control-group">
    <label class="control-label" for="inputPassword"><%=t"register.form.newpassword"%></label>
    <div class="controls">
      <div class="input-prepend">
        <span class="add-on"><i class="icon-eye-open"></i></span>
        <input  id="inputNewPassword" type="password" name="student[newpassword]" placeholder="<%=t"register.form.newpassword"%>"  rel="popover" data-content="Chọn nhập một mật khẩu" data-original-title="Mật khẩu mới">
      </div>
    </div>
  </div>
  <div class="control-group">
    <label class="control-label" for="inputPasswordRepeat"><%=t"register.form.repeatpassword"%></label>
    <div class="controls">
      <div class="input-prepend">
        <span class="add-on"><i class="icon-eye-open"></i></span>
        <input  id="inputNewPasswordRepeat" type="password" name="student[newpassword_confirm]" placeholder="<%=t"register.form.repeatpassword"%>"  rel="popover" data-content="Xác nhận mật khẩu đã nhập" data-original-title="Xác nhận mật khẩu">
      </div>
    </div>
  </div>
  <div class="control-group">
    <label class="control-label" for="reg-submit-btn"></label>
    <div class="controls">
      <button type="submit" name="profilesubmit" id="basic-info-submit-btn" class="btn btn-success" rel="tooltip" title="Cập nhật thông tin cá nhân">Cập nhật</button>
    </div>
  </div>
  <div class="well"><h4>Thông tin cá nhân</h4></div>
  <div class="control-group">
    <label class="control-label" for="studentcode"><%=t"updateprofile.form.studentid"%></label>
    <div class="controls">
      <div class="input-prepend">
        <span class="add-on"><i class="icon-barcode"></i></span>
        <input  id="studentcode" type="text" name="student_profile[studentcode]" value="<%= @student_profile[:studentcode].to_s %>" placeholder="<%=t"updateprofile.form.studentid"%>">
      </div>
    </div>
  </div>
  <div class="control-group">
    <label class="control-label" for="inputFirstname"><%=t"updateprofile.form.firstname"%></label>
    <div class="controls">
      <div class="input-prepend">
        <span class="add-on"><i class="icon-question-sign"></i></span>
        <input  id="inputFirstname" name="student_profile[firstname]" value="<%= @student_profile[:firstname].to_s %>" type="text" placeholder="<%=t"updateprofile.form.firstname"%>">
      </div>
    </div>
  </div>
  <div class="control-group">
    <label class="control-label" for="inputLastname"><%=t"updateprofile.form.lastname"%></label>
    <div class="controls">
      <div class="input-prepend">
        <span class="add-on"><i class="icon-question-sign"></i></span>
        <input  id="inputLastname" type="text" name="student_profile[lastname]" value="<%= @student_profile[:lastname].to_s %>" placeholder="<%=t"updateprofile.form.lastname"%>">
      </div>
    </div>
  </div>
  <div class="control-group">
    <label class="control-label" for="gender"><%=t"updateprofile.form.gender.label"%></label>
    <div class="controls">
      <div class="input-prepend">
        <span class="add-on"><i class="icon-question-sign"></i></span>
        <select name="student_profile[gender]" value="<%= @student_profile[:gender].to_s %>" id="gender">
          <option value="1" <%= @student_profile[:gender]==1? "selected": "" %>><%=t"updateprofile.form.gender.male" %></option>
          <option value="0" <%= @student_profile[:gender]==0? "selected": "" %>><%=t"updateprofile.form.gender.female" %></option>
        </select>
      </div>
    </div>
  </div>
  <div class="control-group">
      <label class="control-label" for="location"><%=t"updateprofile.form.location"%></label>
      <div class="controls">
        <div class="input-prepend">
          <span class="add-on"><i class="icon-home"></i></span>
          <input  id="location" type="text" name="student_profile[location]" value="<%= @student_profile[:location].to_s %>" placeholder="<%=t"updateprofile.form.location"%>">
        </div>
      </div>
  </div>
  <div class="control-group">
    <label class="control-label" for="birthday"><%=t"updateprofile.form.birthday"%></label>
    <div class="controls">
      <div class="input-prepend date" id="date_picker" data-date-format="dd/mm/yyyy" data-date="01/01/1990">
        <span class="add-on"><i class="icon-calendar"></i></span>
        <input id="birthday" type="text" name="student_profile[birthday]" value="<%= @student_profile[:birthday] %>" placeholder="<%=t"updateprofile.form.birthday"%>" data-date-format="dd/mm/yyyy" data-date="01/01/1990">
      </div>
    </div>
  </div>
  <div class="control-group">
    <label class="control-label" for="hobby"><%=t"updateprofile.form.hobby"%></label>
    <div class="controls">
      <div class="input-prepend">
        <span class="add-on"><i class="icon-heart"></i></span>
        <textarea name="student_profile[hobby]" id="hobby" cols="40" rows="4"><%= @student_profile[:hobby].to_s %></textarea>
      </div>
    </div>
  </div>
  <div class="control-group">
    <label class="control-label" for="reg-submit-btn"></label>
    <div class="controls">
      <button type="submit" name="profilesubmit" id="reg-submit-btn" class="btn btn-success" rel="tooltip" title="Cập nhật thông tin cá nhân">Cập nhật</button>
    </div>
  </div>
</form>
<script type="text/javascript">
  $(function(){
      $('#date_picker').datepicker();
      $('#birthday').datepicker()
  });
</script>
